package com.stress.testing.plugin.es.strategy;

import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.index.reindex.ReindexRequest;

public class ReindexRequestIndexRenameStrategy extends AbstractRequestIndexRenameStrategy {
    @Override
    public void renameIndex(Object arg) {
        ReindexRequest request = (ReindexRequest) arg;
        IndexRequest indexRequest = request.getDestination();
        indexRequest.index(internalRenameIndex(indexRequest.index()));
    }
}
